package scuff.msg

trait MessageWriter[-PL <: AnyRef, -S] {
  /**
   * Write payload message to sink,
   * automatically wrapped in message
   * envelope, if needed. The message id
   * is inferred from the message type.
   * @param payload The payload
   * @param sink The sink to write to
   */
  def write(payload: PL)(implicit sink: S)
}
